package com.zycfc.zsf.boot.core.web.data;

import java.io.*;
import javax.validation.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
import com.zycfc.zsf.boot.util.text.*;
import com.zycfc.zsf.boot.util.time.*;

@ApiModel(value = "DataRequest", description = "请求数据类型")
public class DataRequest<T> implements Serializable
{
    private static final long serialVersionUID = 1L;
    @Valid
    @ApiModelProperty("业务参数对象")
    private T data;
    @ApiModelProperty("页码")
    private Integer current;
    @ApiModelProperty("每页条数")
    private Integer pageSize;
    @ApiModelProperty("\u8bf7\u6c42\u552f\u4e00\u6d41\u6c34\u53f7")
    private String flowId;
    @ApiModelProperty("\u7248\u672c\u53f7")
    private String version;
    @ApiModelProperty("\u4ea4\u6613\u7801")
    private String apiCd;
    @NotBlank(message = "\u7cfb\u7edf\u6807\u8bc6sysId")
    @ApiModelProperty("\u7cfb\u7edf\u6807\u8bc6")
    private String sysId;
    @ApiModelProperty("\u65f6\u95f4\u6233,yyyyMMddHHmmss\u683c\u5f0f")
    private String timestamp;
    @ApiModelProperty("\u6e20\u9053\u7f16\u53f7")
    private String channelNo;
    @ApiModelProperty("appKey")
    private String appKey;
    @ApiModelProperty("appKeyConfig,\u5305\u542b\u673a\u6784\u7f16\u53f7\u3001\u4ea7\u54c1\u7f16\u53f7\u3001\u9879\u76ee\u534f\u8bae\u7f16\u53f7")
    private String appKeyConfig;
    
    public DataRequest() {
        this.flowId = UuidUtils.getUuid();
        this.version = "1.0.0";
    }
    
    public DataRequest(final T data) {
        this.flowId = UuidUtils.getUuid();
        this.version = "1.0.0";
        this.flowId = UuidUtils.getUuid();
        this.timestamp = DateUtils.getCurDT() + DateUtils.getCurTM();
        this.data = data;
    }
    
    public DataRequest(final T data, final String flowId) {
        this(data);
        this.flowId = flowId;
    }
    
    public DataRequest(final T data, final Integer current, final Integer pageSize) {
        this(data);
        this.current = current;
        this.pageSize = pageSize;
    }
    
    public T getData() {
        return this.data;
    }
    
    public Integer getCurrent() {
        return this.current;
    }
    
    public Integer getPageSize() {
        return this.pageSize;
    }
    
    public String getFlowId() {
        return this.flowId;
    }
    
    public String getVersion() {
        return this.version;
    }
    
    public String getApiCd() {
        return this.apiCd;
    }
    
    public String getSysId() {
        return this.sysId;
    }
    
    public String getTimestamp() {
        return this.timestamp;
    }
    
    public String getChannelNo() {
        return this.channelNo;
    }
    
    public String getAppKey() {
        return this.appKey;
    }
    
    public String getAppKeyConfig() {
        return this.appKeyConfig;
    }
    
    public void setData(final T data) {
        this.data = data;
    }
    
    public void setCurrent(final Integer current) {
        this.current = current;
    }
    
    public void setPageSize(final Integer pageSize) {
        this.pageSize = pageSize;
    }
    
    public void setFlowId(final String flowId) {
        this.flowId = flowId;
    }
    
    public void setVersion(final String version) {
        this.version = version;
    }
    
    public void setApiCd(final String apiCd) {
        this.apiCd = apiCd;
    }
    
    public void setSysId(final String sysId) {
        this.sysId = sysId;
    }
    
    public void setTimestamp(final String timestamp) {
        this.timestamp = timestamp;
    }
    
    public void setChannelNo(final String channelNo) {
        this.channelNo = channelNo;
    }
    
    public void setAppKey(final String appKey) {
        this.appKey = appKey;
    }
    
    public void setAppKeyConfig(final String appKeyConfig) {
        this.appKeyConfig = appKeyConfig;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof DataRequest)) {
            return false;
        }
        final DataRequest<?> other = (DataRequest<?>)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$data = this.getData();
        final Object other$data = other.getData();
        Label_0065: {
            if (this$data == null) {
                if (other$data == null) {
                    break Label_0065;
                }
            }
            else if (this$data.equals(other$data)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$current = this.getCurrent();
        final Object other$current = other.getCurrent();
        Label_0102: {
            if (this$current == null) {
                if (other$current == null) {
                    break Label_0102;
                }
            }
            else if (this$current.equals(other$current)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$pageSize = this.getPageSize();
        final Object other$pageSize = other.getPageSize();
        Label_0139: {
            if (this$pageSize == null) {
                if (other$pageSize == null) {
                    break Label_0139;
                }
            }
            else if (this$pageSize.equals(other$pageSize)) {
                break Label_0139;
            }
            return false;
        }
        final Object this$flowId = this.getFlowId();
        final Object other$flowId = other.getFlowId();
        Label_0176: {
            if (this$flowId == null) {
                if (other$flowId == null) {
                    break Label_0176;
                }
            }
            else if (this$flowId.equals(other$flowId)) {
                break Label_0176;
            }
            return false;
        }
        final Object this$version = this.getVersion();
        final Object other$version = other.getVersion();
        Label_0213: {
            if (this$version == null) {
                if (other$version == null) {
                    break Label_0213;
                }
            }
            else if (this$version.equals(other$version)) {
                break Label_0213;
            }
            return false;
        }
        final Object this$apiCd = this.getApiCd();
        final Object other$apiCd = other.getApiCd();
        Label_0250: {
            if (this$apiCd == null) {
                if (other$apiCd == null) {
                    break Label_0250;
                }
            }
            else if (this$apiCd.equals(other$apiCd)) {
                break Label_0250;
            }
            return false;
        }
        final Object this$sysId = this.getSysId();
        final Object other$sysId = other.getSysId();
        Label_0287: {
            if (this$sysId == null) {
                if (other$sysId == null) {
                    break Label_0287;
                }
            }
            else if (this$sysId.equals(other$sysId)) {
                break Label_0287;
            }
            return false;
        }
        final Object this$timestamp = this.getTimestamp();
        final Object other$timestamp = other.getTimestamp();
        Label_0324: {
            if (this$timestamp == null) {
                if (other$timestamp == null) {
                    break Label_0324;
                }
            }
            else if (this$timestamp.equals(other$timestamp)) {
                break Label_0324;
            }
            return false;
        }
        final Object this$channelNo = this.getChannelNo();
        final Object other$channelNo = other.getChannelNo();
        Label_0361: {
            if (this$channelNo == null) {
                if (other$channelNo == null) {
                    break Label_0361;
                }
            }
            else if (this$channelNo.equals(other$channelNo)) {
                break Label_0361;
            }
            return false;
        }
        final Object this$appKey = this.getAppKey();
        final Object other$appKey = other.getAppKey();
        Label_0398: {
            if (this$appKey == null) {
                if (other$appKey == null) {
                    break Label_0398;
                }
            }
            else if (this$appKey.equals(other$appKey)) {
                break Label_0398;
            }
            return false;
        }
        final Object this$appKeyConfig = this.getAppKeyConfig();
        final Object other$appKeyConfig = other.getAppKeyConfig();
        if (this$appKeyConfig == null) {
            if (other$appKeyConfig == null) {
                return true;
            }
        }
        else if (this$appKeyConfig.equals(other$appKeyConfig)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof DataRequest;
    }
    
    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $data = this.getData();
        result = result * 59 + (($data == null) ? 43 : $data.hashCode());
        final Object $current = this.getCurrent();
        result = result * 59 + (($current == null) ? 43 : $current.hashCode());
        final Object $pageSize = this.getPageSize();
        result = result * 59 + (($pageSize == null) ? 43 : $pageSize.hashCode());
        final Object $flowId = this.getFlowId();
        result = result * 59 + (($flowId == null) ? 43 : $flowId.hashCode());
        final Object $version = this.getVersion();
        result = result * 59 + (($version == null) ? 43 : $version.hashCode());
        final Object $apiCd = this.getApiCd();
        result = result * 59 + (($apiCd == null) ? 43 : $apiCd.hashCode());
        final Object $sysId = this.getSysId();
        result = result * 59 + (($sysId == null) ? 43 : $sysId.hashCode());
        final Object $timestamp = this.getTimestamp();
        result = result * 59 + (($timestamp == null) ? 43 : $timestamp.hashCode());
        final Object $channelNo = this.getChannelNo();
        result = result * 59 + (($channelNo == null) ? 43 : $channelNo.hashCode());
        final Object $appKey = this.getAppKey();
        result = result * 59 + (($appKey == null) ? 43 : $appKey.hashCode());
        final Object $appKeyConfig = this.getAppKeyConfig();
        result = result * 59 + (($appKeyConfig == null) ? 43 : $appKeyConfig.hashCode());
        return result;
    }
    
    @Override
    public String toString() {
        return "DataRequest(data=" + this.getData() + ", current=" + this.getCurrent() + ", pageSize=" + this.getPageSize() + ", flowId=" + this.getFlowId() + ", version=" + this.getVersion() + ", apiCd=" + this.getApiCd() + ", sysId=" + this.getSysId() + ", timestamp=" + this.getTimestamp() + ", channelNo=" + this.getChannelNo() + ", appKey=" + this.getAppKey() + ", appKeyConfig=" + this.getAppKeyConfig() + ")";
    }
}
